package com.wsc.wsckeeper.persistence.dao;

import java.sql.SQLException;

import com.j256.ormlite.dao.Dao;
import com.wsc.wsckeeper.managers.DatabaseManager;
import com.wsc.wsckeeper.model.entity.AccountE;
import com.wsc.wsckeeper.model.entity.CardE;
import com.wsc.wsckeeper.model.entity.CardTypeE;
import com.wsc.wsckeeper.model.entity.CurrencyE;

public class GenericDao<T, PK> {

	protected static Dao<CurrencyE, Long> getCurrencyDao() throws SQLException {
		return DatabaseManager.getInstance().getDbHelper().getDao(CurrencyE.class);
	}

	protected static Dao<CardTypeE, Long> getCardTypeDao() throws SQLException {
		return DatabaseManager.getInstance().getDbHelper().getDao(CardTypeE.class);
	}

	protected static Dao<CardE, Long> getCardDao() throws SQLException {
		return DatabaseManager.getInstance().getDbHelper().getDao(CardE.class);
	}

	protected static Dao<AccountE, Long> getAccountDao() throws SQLException {
		return DatabaseManager.getInstance().getDbHelper().getDao(AccountE.class);
	}
}
